package krt.wid.gslzs.base;

import android.app.Fragment;
import android.view.View;

import butterknife.ButterKnife;
import butterknife.Unbinder;
import krt.wid.base.MBaseFragment;
import krt.wid.gslzs.util.SpUtil;

/**
 * @author Marcus
 * @package krt.wid.gslzs.base
 * @description
 * @time 2018/5/8
 */

public abstract class BaseFragment extends MBaseFragment {

    private Unbinder unBinder;

    protected MApplication mApplication;

    protected SpUtil mSpUtil;

    @Override
    public void unBindButterKnife() {
        unBinder.unbind();
    }

    @Override
    public void bindButterKnife(View view) {
        unBinder = ButterKnife.bind(this, view);
    }

    @Override
    public void init() {
        mApplication = ((BaseActivity) getActivity()).mApp;
        mSpUtil = new SpUtil(mContext);
    }
}
